//
//  TabBarController.swift
//  Woolgathering
//
//  Created by 范东 on 2022/3/7.
//

import UIKit

class TabBarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        
        let myVC = MyActionsViewController()
        let myNav = BaseNavigationController(rootViewController: myVC)
        let myItem = UITabBarItem(title: NSLocalizedString("My Actions", comment: ""), image: UIImage(systemName: "rectangle.grid.2x2.fill"), selectedImage: UIImage(systemName: "rectangle.grid.2x2.fill"))
        myNav.tabBarItem = myItem
        
        let newVC = NewActionViewController()
        let newNav = BaseNavigationController(rootViewController: newVC)
        let newItem = UITabBarItem(title: NSLocalizedString("Pick New Action", comment: ""), image: UIImage(systemName: "figure.wave"), selectedImage: UIImage(systemName: "figure.wave"))
        newNav.tabBarItem = newItem
        
        let actionsVC = ActionsViewController()
        let actionsNav = BaseNavigationController(rootViewController: actionsVC)
        let actionsItem = UITabBarItem(title: NSLocalizedString("Actions Center", comment: ""), image: UIImage(systemName: "square.2.stack.3d.top.fill"), selectedImage: UIImage(systemName: "square.2.stack.3d.top.fill"))
        actionsNav.tabBarItem = actionsItem
        
        viewControllers = [myNav,newNav,actionsNav]
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
